﻿@model StockPredictor.Models.PortfolioRecordModel

@{
    ViewBag.Title = "Add to Portfolio";
}

<h2>Create new Portfolio Record</h2>

@using (Html.BeginForm())
{
    <fieldset>
        <legend>
            New Portfolio Record
        </legend>
        <div class="editor-label">
            Stock Symbol
        </div>
        <div class="editor-field">
            @{
                var symbols = System.Configuration.ConfigurationManager.AppSettings["UsStocksToEvaluate"].Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                var symbolList = new SelectList(symbols);
            }

            @Html.DropDownListFor(model => model.StockSymbol, @symbolList)
        </div>
         <div class="editor-label">
            Number of Shares
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Shares)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>

}
    
<div>
    @Html.ActionLink("Back to My Portfolio", "Index")
</div>
